package factory.simple;

import factory.Audi;
import factory.Bmw;
import factory.Car;

/**
 * 简单工厂
 * @author cctv
 */
public class SimpleFactory {
    public Car getCar(String name){
        if("BMW".equalsIgnoreCase(name)){
            return new Bmw();
        }else if("Audi".equalsIgnoreCase(name)){
            return new Audi();
        }
        return null;

    }
}
